package org.example.service.impl;

import org.example.domain.CarPlan;
import org.example.mapper.CarPlanMapper;
import org.example.service.CarPlanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CarPlanServiceImpl implements CarPlanService {

    @Autowired
    CarPlanMapper carPlanMapper;

    @Override
    public List<CarPlan> listAll(CarPlan carPlan) {
        return carPlanMapper.listAll(carPlan);
    }

    @Override
    public void saveBatch(List<CarPlan> cacheDataList) {
        carPlanMapper.saveBatch(cacheDataList);
    }

    @Override
    public void updateQiangDanById(Integer planId) {
        carPlanMapper.updateQiangDanById(planId);
    }

    @Override
    public CarPlan selectByPlanById(Integer planId) {
        return carPlanMapper.selectByPlanById(planId);
    }

    @Override
    public CarPlan selectByplanIdAndClientId(Integer planId, Integer clientId) {
        return carPlanMapper.selectByplanIdAndClientId(planId,clientId);
    }
}
